import Sequelize = require("sequelize");
export class Mysql{
    protected sequelize;

    public connect(host,user,password,database,port){
        this.sequelize = new Sequelize(database, user, password, {
            host: host,
            dialect: 'mysql',
            pool: {
                max: 1000,
                min: 0,
                idle: 10000
            },
            'define': {
                // 字段以下划线（_）来分割（默认是驼峰命名风格）
                'underscored': true
            }
        });
        
        return this.sequelize;
    }
    
    public query(){

    }

    public close(){
    }
}

export default Mysql;
